<include file="Public/min-header" />
<div class="wrapper">
    <include file="Public/breadcrumb" />
    <section class="content">
        <div class="container-fluid">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><i class="fa fa-list"></i>分成记录</h3>
                </div>
                <div class="panel-body">
                    <div class="navbar navbar-default">
                        <form id="search-form2" class="navbar-form form-inline"  method="post" action="{:U('/Admin/AppDistribut/bonus')}">
                            <div class="form-group">
                                <label for="input-order-id" class="control-label">状态:</label>
                                <div class="form-group">
                                    <select class="form-control" id="status" name="status">                       
                                        <option value="-1">全部</option>                    
                                        <option value="0"<if condition="$_REQUEST['status'] heq '0'">selected</if>>未付款</option>
                                        <option value="1"<if condition="$_REQUEST['status'] eq 1">selected</if>>已付款</option>
                                        <option value="2"<if condition="$_REQUEST['status'] eq 2">selected</if>>等待分成</option>
                                        <option value="3"<if condition="$_REQUEST['status'] eq 3">selected</if>>已分成</option>
                                        <option value="4"<if condition="$_REQUEST['status'] eq 4">selected</if>>已取消</option>
                                    </select>
                                </div>
                                <label for="input-order-id" class="control-label">用户ID:</label>
                                <div class="input-group">
                                    <input type="text" class="form-control" id="user_id" placeholder="用户id" value="" name="user_id">                    
                                </div>
                                <label for="input-order-id" class="control-label">订单号:</label>                
                                <div class="input-group">
                                    <input type="text" class="form-control" id="input-order-id" placeholder="订单编号" value="{$_REQUEST[order_sn]}" name="order_sn">                    
                                </div>
                            </div>
                            <div class="form-group">    
                                <button class="btn btn-primary" id="button-filter search-order" onclick="ajaxGetTable('search-form2', 1);" type="button"><i class="fa fa-search"></i> 筛选</button>    
                            </div>                                 
                        </form>    
                    </div>
                    <div id="ajax_return">

                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
<script>
    $(document).ready(function () {
        ajaxGetTable('search-form2', 1);

    });

// ajax 抓取页面
    function ajaxGetTable(tab, page) {
        cur_page = page; //当前页面 保存为全局变量
        $.ajax({
            type: "POST",
            url: "/index.php/Admin/AppDistribut/ajaxBonus/p/" + page,
            data: $('#' + tab).serialize(),
            success: function (data) {
                $("#ajax_return").html('');
                $("#ajax_return").append(data);
            }
        });
    }

</script>
</body>

</html>
